{% extends 'myapp/base.html' %}

{% block main_body %}
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            病人信息管理
            <small>智慧医疗系统</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="{% url 'myapp_index' %}"><i class="fa fa-home"></i> 首页</a></li>
            <li class="active">病人信息管理</li>
        </ol>
        </section>

        <!-- Main content -->
        <section class="content container-fluid">

        <div class="row">
            <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <div>
                        <a class="btn btn-success" href="add" >
                            <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>>
                            新增患者
                        </a>
                    </div>

                <div class="box-tools">
                    <form action="{% url 'myapp_patientinfo_search' %}" method="post">
                        <div class="input-group input-group-sm" style="width:150px;">
                          <input type="text" name="hspid" class="form-control pull-right" placeholder="编号">

                          <div class="input-group-btn">
                            <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                          </div>
                        </div>
                    </form>
                </div>
                </div>

                <head>
                    <style>
                        table {
                            border-collapse: collapse;
                            width: 100%;
                            font-family: Arial, sans-serif;
                            font-size: 9px;
                            text-align: center;
                        }
                        th {
                            background-color: #75a0cc;
                            color: rgb(255, 255, 255);
                            font-size: 10px;
                            text-align: center;
                        }
                        td, th {
                            border: 1px solid #ddd;
                            padding: 3px;
                        }
                        tr:nth-child(even) {
                            background-color: #f5f5f5;
                        }
                    </style>
                </head>
                <body>
                    <table>
                        <thead>
                            <!-- /.box-header -->
                <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <tr>
                    <th>操作</th>
                    <th>住院号</th>
                    <th>病人姓名</th>
                    <th>性别</th>
                    <th>科室</th>
                    <th>负责医生</th>
                    <th>床位信息</th>
                    <th>入院时间</th>
                    <th>入院诊断</th>
                    <th>病区</th>
                    <th>MRID</th>
                    <th>身份证号</th>
                    <th>社保</th>
                    <th>社保号</th>
                    <th>入院种类</th>
                    <th>病症</th>
                    <th>季节</th>
                    <th>婚姻情况</th>
                    <th>国家</th>
                    <th>职业</th>
                    <th>地址</th>
                    <th>公司</th>
                    <th>季节</th>
                    <th>公司</th>
                    <th>联系人姓名</th>
                    <th>与病人关系</th>
                    <th>邮编</th>
                    <th>出生日期</th>
                    <th>记录时间</th>
                    </tr>
                        </thead>
        
                        <tbody> 
                            {% for obj in patientinfolist %}
                            <tr>
                                <td>
                                    <a href="{% url 'myapp_patientinfo_edit' obj.hspid %}" class="btn btn-primary btn-xs" >编辑</a>
                                    <a href="{% url 'myapp_patientinfo_delete' obj.hspid %}" class="btn btn-danger btn-xs" >删除</a>
                                </td>
                                <td>{{ obj.hspid }}</td>
                                <td>{{ obj.name }}</td>
                                <td>{{ obj.gender }}</td>
                                <td>{{ obj.departname }}</td>
                                <td>{{ obj.doctorname }}</td>
                                <td>{{ obj.bedid }}</td>
                                <td>{{ obj.inhsptimes }}</td>
                                <td>{{ obj.inhspdiagnose }}</td>
                                <td>{{ obj.departzone }}</td>
                                <td>{{ obj.mrid }}</td>
                                <td>{{ obj.idcardno }}</td>
                                <td>{{ obj.medinsurancetype }}</td>>
                                <td>{{ obj.medinsuranceid }}</td>
                                <td>{{ obj.inhsptype }}</td>>
                                <td>{{ obj.illness }}</td>>
                                <td>{{ obj.illseason }}</td>>
                                <td>{{ obj.marriage }}</td>>
                                <td>{{ obj.nation }}</td>>
                                <td>{{ obj.profession }}</td>>
                                <td>{{ obj.address }}</td>>
                                <td>{{ obj.corporation }}</td>>
                                <td>{{ obj.contactsname }}</td>>
                                <td>{{ obj.relation }}</td>>
                                <td>{{ obj.contactsphone }}</td>>
                                <td>{{ obj.postcode }}</td>>
                                <td>{{ obj.birthday }}</td>>
                                <td>{{ obj.hsptime }}</td>>            
                            </tr>
                            {% endfor %}
                        </tbody>
                    </table>
                </body>

                


                <!-- <div class="container"> -->

        </section>

{% endblock %}